<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  if (!isset($process)) $process = false;
?>

<div class="contentText">
  <?php
  if (ACCOUNT_GENDER == 'true') {
    if (isset($gender)) {
      $male = ($gender == 'm') ? true : false;
      $female = ($gender == 'f') ? true : false;
	  echo "IN";
    } else {
      $male = false;
      $female = false;
    }
?>
  <div class="contact-left mgt15 w150px"><?php echo ENTRY_GENDER; ?></div>
  <div class="mgt15 fl mgl15"> <?php echo tep_draw_radio_field('gender', 'm',$male) ?>
    <label for="male" class="mgr10">MALE</label>
    <?php echo tep_draw_radio_field('gender', 'f',$female) ?>
    <label for="female"> FEMALE</label>
    <?php (tep_not_null(ENTRY_GENDER_TEXT) ? '<div class="required fl">' . ENTRY_GENDER_TEXT . '</div>' : ''); ?>
  </div>
  <div class="spacer5"></div>
  <?php
  }
?>
  <div class="contact-left mgt15 w150px"><?php echo ENTRY_FIRST_NAME; ?></div>
  <div class="hinputbg fl"> <?php echo tep_draw_input_field('firstname', '', 'class="hinput"') ?> </div>
  <?php (tep_not_null(ENTRY_FIRST_NAME_TEXT) ? '<div class="required fl">' . ENTRY_FIRST_NAME_TEXT . '</div>' : ''); ?>
  <div class="spacer5"></div>
  <div class="contact-left mgt15 w150px"><?php echo ENTRY_LAST_NAME; ?></div>
  <div class="hinputbg fl"> <?php echo tep_draw_input_field('lastname', '', 'class="hinput"') ?> </div>
  <?php (tep_not_null(ENTRY_LAST_NAME_TEXT) ? '<div class="required fl">' . ENTRY_LAST_NAME_TEXT . '</div>' : ''); ?>
  <div class="spacer5"></div>
  <?php
  if (ACCOUNT_COMPANY == 'true') {
?>
  <div class="contact-left mgt15 w150px"><?php echo ENTRY_COMPANY; ?></div>
  <div class="hinputbg fl"><?php echo tep_draw_input_field('company', '', 'class="hinput"'); ?></div>
  <?php (tep_not_null(ENTRY_COMPANY_TEXT) ? '<div class="required fl">' . ENTRY_COMPANY_TEXT . '</div>' : ''); ?>
  <div class="spacer5"></div>
  <?php
  }
?>
  <div class="contact-left mgt15 w150px"><?php echo ENTRY_STREET_ADDRESS; ?></div>
  <div class="hinputbg fl"> <?php echo tep_draw_input_field('street_address', '', 'class="hinput"') ?> </div>
  <?php (tep_not_null(ENTRY_STREET_ADDRESS_TEXT) ? '<div class="required fl">' . ENTRY_STREET_ADDRESS_TEXT . '</div>' : ''); ?>
  <div class="spacer5"></div>
  <?php
  if (ACCOUNT_SUBURB == 'true') {
?>
  <div class="contact-left mgt15 w150px"><?php echo ENTRY_SUBURB; ?></div>
  <div class="hinputbg fl"> <?php echo tep_draw_input_field('suburb', '', 'class="hinput"') ?> </div>
  <?php (tep_not_null(ENTRY_SUBURB_TEXT) ? '<div class="required fl">' . ENTRY_SUBURB_TEXT . '</div>' : ''); ?>
  <div class="spacer5"></div>
  <?php
  }
?>
  <div class="contact-left mgt15 w150px"><?php echo ENTRY_POST_CODE; ?></div>
  <div class="hinputbg fl"> <?php echo tep_draw_input_field('postcode', '', 'class="hinput"') ?> </div>
  <?php (tep_not_null(ENTRY_POST_CODE_TEXT) ? '<div class="required fl">' . ENTRY_POST_CODE_TEXT . '</div>' : ''); ?>
  <div class="spacer5"></div>
  <div class="contact-left mgt15 w150px"><?php echo ENTRY_CITY; ?></div>
  <div class="hinputbg fl"> <?php echo tep_draw_input_field('city', '', 'class="hinput"') ?> </div>
  <?php (tep_not_null(ENTRY_CITY_TEXT) ? '<div class="required fl">' . ENTRY_CITY_TEXT . '</div>' : ''); ?>
  <div class="spacer5"></div>
  <?php
  if (ACCOUNT_STATE == 'true') {
?>
  <div class="contact-left mgt15 w150px"><?php echo ENTRY_STATE; ?></div>
  <div class="hinputbg fl">
    <?php
                                if ($process == true) {
                                    if ($entry_state_has_zones == true) {
                                        $zones_array = array();
                                        $zones_query = tep_db_query("select zone_name from " . TABLE_ZONES . " where zone_country_id = '" . (int) $country . "' order by zone_name");
                                        while ($zones_values = tep_db_fetch_array($zones_query)) {
                                            $zones_array[] = array('id' => $zones_values['zone_name'], 'text' => $zones_values['zone_name']);
                                        }
                                        echo tep_draw_pull_down_menu('state', $zones_array, '', 'class="hinputcombo"');
                                    } else {
                                        echo tep_draw_input_field('state', '', 'class="hinput"');
                                    }
                                } else {
                                    echo tep_draw_input_field('state', '', 'class="hinput"');
                                }
                                ?>
  </div>
  <?php (tep_not_null(ENTRY_STATE_TEXT) ? '<div class="required fl">' . ENTRY_STATE_TEXT . '</div>' : ''); ?>
  <div class="spacer5"></div>
  <?php
  }
?>
  <div class="contact-left mgt15 w150px"><?php echo ENTRY_COUNTRY; ?></div>
  <div class="hinputbg fl"> <?php echo tep_get_country_list('country', STORE_COUNTRY, 'class="hinputcombo"') ?> </div>
  <?php (tep_not_null(ENTRY_COUNTRY_TEXT) ? '<div class="required fl">' . ENTRY_COUNTRY_TEXT . '</div>' : ''); ?>
  <div class="spacer15"></div>
</div>
